home *** CD-ROM | disk | FTP | other *** search
/ Animation How-To / Animation How-to CD.iso / PLY / CHAPTER3 / ROCKY / ROCK3.PI < prev    next >
Text File  |  1994-01-01  |  1KB  |  66 lines

  1. // ROCK3.PI
  2. // Rocking Color Weirdness
  3.  
  4. start_frame 0
  5. end_frame 29
  6. total_frames 30
  7.  
  8. outfile "rock3"
  9.  
  10. define pi 3.1415927
  11. define rad pi/180
  12.  
  13. define index 360/total_frames
  14. define phz frame*index
  15.  
  16. define tx 100*sin(phz*rad)
  17. define ty 50*sin(phz*rad)
  18. define tz 100*sin(phz*rad)
  19.  
  20. // Get various surface finishes
  21. background MidnightBlue
  22. light <0.5, 0.5, 0.5>, < 180, 150, -150>
  23. light <0.5, 0.5, 0.5>, < 0, 100, -15>
  24. light <0.5, 0.5, 0.5>, < 0, 0, 0>
  25.  
  26. // Set up the camera
  27. viewpoint {
  28.    from <300,200,-250>
  29.    at <0,0,0>
  30.    up <0,1,0>
  31.    angle 90
  32.    hither 1
  33.    aspect 1.433
  34.    resolution 320,200
  35.    }
  36.  
  37. include "colormap.inc"
  38.  
  39. // Hints:
  40.  
  41. // position_plain       0
  42. // position_objectx     1
  43. // position_worldx      2
  44. // position_cylindrical 3
  45. // position_spherical   4
  46. // position_radial      5
  47.  
  48. // lookup_plain    0
  49. // lookup_sawtooth 1
  50. // lookup_sin      2
  51. // lookup_ramp     3
  52.  
  53. define a 3            // position
  54. define b 2            // lookup
  55. define c 2            // octaves
  56. define d 2+sin(phz*rad) // turbulance
  57.  
  58. include "text2.inc"
  59.  
  60. // Create a volume
  61. object {
  62.    sphere <0,0,0>, 10*54
  63.    color_phase
  64.    translate <tx,ty,tz>
  65.    }
  66.